/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package messaage;

import java.util.List;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
import forum.Member;

/**
 * 
 * @author Olga
 */
public class GotFriendsListMsg extends Message {

	private List<Member> friendsList;

	public GotFriendsListMsg(List<Member> friends) {
		this.friendsList = friends;
		this.type = "GotFriendsListMsg";

	}

	@Override
	public String toString() {
		XStream xstream = new XStream(new DomDriver());
		String xml = xstream.toXML(this)+"\0";

		return xml;
	}

	public List<Member> getListOfFriends() {
		return this.friendsList;
	}

}
